From: kfraser@localhost.localdomain Date: Wed, 4 Apr 2007 17:41:42 +0000 (+0100) Subject: hvm: x86 ioemu-dm does not need a memory-size parameter on the command line. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15264^2~29 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:/?a=commitdiff_plain;h=5967572aaba45da2551f8ad0e79e0b6062f3507d;p=xen.git hvm: x86 ioemu-dm does not need a memory-size parameter on the command line. Signed-off-by: Keir Fraser --- diff --git a/tools/ioemu/target-i386-dm/exec-dm.c b/tools/ioemu/target-i386-dm/exec-dm.c index 225f8b6f3a..d992f987e1 100644 --- a/tools/ioemu/target-i386-dm/exec-dm.c +++ b/tools/ioemu/target-i386-dm/exec-dm.c @@ -431,14 +431,8 @@ static inline int paddr_is_ram(target_phys_addr_t addr) { /* Is this guest physical address RAM-backed? */ #if defined(CONFIG_DM) && (defined(__i386__) || defined(__x86_64__)) - if (ram_size <= HVM_BELOW_4G_RAM_END) - /* RAM is contiguous */ - return (addr < ram_size); - else - /* There is RAM below and above the MMIO hole */ - return ((addr < HVM_BELOW_4G_MMIO_START) || - ((addr >= HVM_BELOW_4G_MMIO_START + HVM_BELOW_4G_MMIO_LENGTH) - && (addr < ram_size + HVM_BELOW_4G_MMIO_LENGTH))); + return ((addr < HVM_BELOW_4G_MMIO_START) || + (addr >= HVM_BELOW_4G_MMIO_START + HVM_BELOW_4G_MMIO_LENGTH)); #else return (addr < ram_size); #endif diff --git a/tools/ioemu/xenstore.c b/tools/ioemu/xenstore.c index 77819cea67..e04a74236c 100644 --- a/tools/ioemu/xenstore.c +++ b/tools/ioemu/xenstore.c @@ -272,7 +272,7 @@ void xenstore_process_logdirty_event(void) /* Double-check that the bitmaps are the size we expect */ if (logdirty_bitmap_size != *(uint32_t *)seg) { - fprintf(logfile, "Log-dirty: got %lu, calc %lu\n", + fprintf(logfile, "Log-dirty: got %u, calc %lu\n", *(uint32_t *)seg, logdirty_bitmap_size); return; } @@ -304,7 +304,7 @@ void xenstore_process_logdirty_event(void) fprintf(logfile, "Log-dirty: bad next-active entry: %s\n", act); exit(1); } - logdirty_bitmap = seg + i * logdirty_bitmap_size; + logdirty_bitmap = (unsigned long *)(seg + i * logdirty_bitmap_size); /* Ack that we've switched */ xs_write(xsh, XBT_NULL, active_path, act, len); @@ -612,7 +612,7 @@ int xenstore_vm_write(int domid, char *key, char *value) path = xs_get_domain_path(xsh, domid); if (path == NULL) { - fprintf(logfile, "xs_get_domain_path(%d): error\n"); + fprintf(logfile, "xs_get_domain_path: error\n"); goto out; } diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py index 835a5d8060..ecdea40074 100644 --- a/tools/python/xen/xend/image.py +++ b/tools/python/xen/xend/image.py @@ -426,11 +426,14 @@ class HVMImageHandler(ImageHandler): # Execute device model. #todo: Error handling args = [self.device_model] - args = args + ([ "-d", "%d" % self.vm.getDomid(), - "-m", "%s" % (self.getRequiredInitialReservation() / 1024)]) + args = args + ([ "-d", "%d" % self.vm.getDomid() ]) + if arch.type == "ia64": + args = args + ([ "-m", "%s" % + (self.getRequiredInitialReservation() / 1024) ]) args = args + self.dmargs if restore: - args = args + ([ "-loadvm", "/tmp/xen.qemu-dm.%d" % self.vm.getDomid() ]) + args = args + ([ "-loadvm", "/tmp/xen.qemu-dm.%d" % + self.vm.getDomid() ]) env = dict(os.environ) if self.display: env['DISPLAY'] = self.display